import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';

@Injectable({
  providedIn: 'root'
})
export class LogService {
  private apiUrl = '/api/app/log';

  constructor(private http: HttpClient) { }

  log(operatorName: string, operationType: string, description: string, documentId?: string): Observable<void> {
    return this.http.post<void>(this.apiUrl, {
      operatorName,
      operationType,
      description,
      documentId
    });
  }
} 